#!/bin/bash
/usr/bin/sqoop import "-Dorg.apache.sqoop.splitter.allow_text_splitter=true" \
--connect 'jdbc:mysql://106.75.33.59:3306/scrm?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true' \
--username itcast_edu_stu \
--password itcast_edu_stu \
--query 'select `id`,`customer_relationship_first_id`,`employee_id`,`employee_name`,`employee_department_id`,`employee_tdepart_id`,`appeal_status`,`audit_id`,`audit_name`,`audit_department_id`,`audit_department_name`,`audit_date_time`,`create_date_time`,`update_date_time`,`deleted`,`tenant`,DATE_SUB(curdate(),INTERVAL 1 DAY) as dt from customer_appeal where $CONDITIONS' \
--hcatalog-database notp_ods \
--hcatalog-table customer_appeal \
--split-by id \
--m 100

/usr/bin/sqoop import "-Dorg.apache.sqoop.splitter.allow_text_splitter=true" \
--connect 'jdbc:mysql://106.75.33.59:3306/scrm?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true' \
--username itcast_edu_stu \
--password itcast_edu_stu \
--query 'select *,DATE_SUB(curdate(),INTERVAL 1 DAY) as dt from customer_clue where $CONDITIONS' \
--hcatalog-database notp_ods \
--hcatalog-table customer_clue \
--split-by id \
--m 100

/usr/bin/sqoop import "-Dorg.apache.sqoop.splitter.allow_text_splitter=true" \
--connect 'jdbc:mysql://106.75.33.59:3306/scrm?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true' \
--username itcast_edu_stu \
--password itcast_edu_stu \
--query 'select *,DATE_SUB(curdate(),INTERVAL 1 DAY) as dt from customer_relationship where $CONDITIONS' \
--hcatalog-database notp_ods \
--hcatalog-table customer_relationship \
--split-by id \
--m 100
